var orgData = _appConfigs.getUserData().userOrgs;
$('#unemployedCollectGrid').datagrid({    
	url:'collect/management/getUnemployedCollectList', 
	rownumbers:true,
    fit:true,
    fitColumns:true,
    singleSelect:true,
    striped:true,
    
    columns:[[
              {field:'streetName',title:'街道名称',width:100,rowspan:3,align:'center'},
            	    /*formatter:function(data){
            	    	return "<a id='streetId' href='collect/management/unemployedCollect_street' style='text-decoration:none;' target='_self' >"+data+"</a>";
          	        }},*/
              {field:'project',title:'项目',width:100,rowspan:3,align:'center'},
              {title:'当年有就业愿望的登记失业人员',colspan:7,align:'center'}, 
              {field:'yearRealize',title:'当年实现就业<br />人数',width:100,rowspan:3,align:'center'},    
              {field:'employmentRate',title:'就业率',width:100,rowspan:3,align:'center'}],
              [
              {field:'unemployed',title:'小计',width:100,rowspan:2,align:'center'},
              {field:'priorYear',title:'上年结转',width:100,rowspan:2,align:'center'},    
              {title:'本年增加',colspan:2,align:'center'},
              {title:'个人原因减少',colspan:3,align:'center'}],
              [  
              {field:'totalYear',title:'小计',width:100,align:'center'},    
              {field:'totalMonth',title:'本月新增',width:100,align:'center'},
              {field:'reduceSummary',title:'小计',width:100,align:'center'},    
              {field:'objReason',title:'因客观原因',width:100,align:'center'},
              {field:'giveupJob',title:'放弃求职',width:100,align:'center'}
            ]]
}); 

function joblessStreet(){
	debugger;
	var rowData = $('#unemployedCollectGrid').datagrid('getSelected');
	if(rowData == undefined || rowData.streetName == '合计'){
		$.messager.alert('消息','请选择街道');
	}else{
//		alert(rowData.streetName);
		var isExists = window.mainpage.mainTabs.isExists('失业人员情况汇总表（街道）', 'collect/management/unemployedCollect_street_jump');
	    switch (isExists) {
	        case 0: 
	    	    window.mainpage.mainTabs.createTab('失业人员情况汇总表（街道）','collect/management/unemployedCollect_street_jump',
	    	        '', true, true, true, true, {name: 'bindData', params: rowData}); break;
	        case 1: 
	    	    window.mainpage.mainTabs.createTab('失业人员情况汇总表（街道）','collect/management/unemployedCollect_street_jump',
	    	        '', true, true, true, true, {name: 'bindData', params: rowData}); break;
	        case 2: 
	    	    window.mainpage.mainTabs.jumpTab('失业人员情况汇总表（街道）', {name: 'bindData', params: rowData}); break;
	        default: break;
	    }
	}
}
/**
 * 失业人员全区汇总信息excel导出
 */
function exportUnemployedCollectList(){
	 window.location.href ="collect/excel/exportUnemployedCollectList";
}